// pages/index/articleList/articleList.js
Page({

  /**
   * Page initial data
   */
  data: {
    article:[]
  },

  transDetail(e){
   
    wx.navigateTo({
      url: '/pages/index/articledetail/articleDetail?id='+e.currentTarget.dataset.id,
    })
  },

  /**
   * Lifecycle function--Called when page load
   */
  onLoad(options) {
    wx.request({
      url: 'http://localhost:8080/article/getAllArticles?pageNum=1&pageSize=100',
      success:(res)=>{
        console.log(res.data.data.list);
        this.setData({
          article:res.data.data.list
        })
      }
    })
  },

  /**
   * Lifecycle function--Called when page is initially rendered
   */
  onReady() {

  },

  /**
   * Lifecycle function--Called when page show
   */
  onShow() {

  },

  /**
   * Lifecycle function--Called when page hide
   */
  onHide() {

  },

  /**
   * Lifecycle function--Called when page unload
   */
  onUnload() {

  },

  /**
   * Page event handler function--Called when user drop down
   */
  onPullDownRefresh() {

  },

  /**
   * Called when page reach bottom
   */
  onReachBottom() {

  },

  /**
   * Called when user click on the top right corner to share
   */
  onShareAppMessage() {

  }
})